home *** CD-ROM | disk | FTP | other *** search
- Short: Fast line/word/character counting ARexx hack for CED
- Author: Matthias.Bethke@gmx.net
- Uploader: Matthias.Bethke@gmx.net
- Version: 1.3
- Type: text/edit
- Requires: wc (from the GeekGadgets textutils package, ftp.ninemoons.com)
-
-
- This is a quick ARexx hack I threw together (forgive the probably not very
- nice code - I'm neither experienced in ARexx nor too keen on improving it
- stylistically) to quickly count lines, words and characters in a file or
- marked block in CygnusEd. It basically saves the block to a temp file, runs
- "wc" (the Unix "word count" command) on it, grabs its output and displays
- it in a CED requester. Oh, and it deletes the temp files, too :-)
-
- Installation: Just copy it to your HD (preferably to REXX:ced/) and use the
- "Special -> Dos/ARexx Interface -> Install Dos/Arexx command" menu to bind
- it to some key. No arguments required.
-
- Advantages:
- - Fast. The "Word-Count-File.ced" macro takes ages for the same job.
- - Flexbile. Well, more flexible than the former that is, although that
- doesn't tell much. It can process blocks, too, that's about it.
- Disadvantages:
- - Needs temporary storage. This is currently in T:, i.e. you have to have
- enough free RAM for the temp file plus wc (which in turn loads
- ixemul.library, if you don't have it loaded anyway!). If you don't like
- that, set it to some directory on your HD (masochists: use Floppies or
- ParNet drives 8-))
- - Kills the current copy buffer. Even without a marked block it has to mark
- and copy the entire file first :-( If anybody knows how to save a copy to
- another file without permanently changing the current fil's name in CED,
- tell me!
-
-
- ============================= Archive contents =============================
-
- Original Packed Ratio Date Time Name
- -------- ------- ----- --------- -------- -------------
- 1644 930 43.4% 16-Jul-00 19:28:10 WordCount.readme
- 850 411 51.6% 16-Jul-00 18:58:02 Word-Count-Fast.ced
- -------- ------- ----- --------- --------
- 2494 1341 46.2% 17-Jul-100 20:09:22 2 files
-